/*
 * @Author: Li Zengkun
 * @Date: 2022-09-26 19:19:43
 * @LastEditors: Li Zengkun
 * @LastEditTime: 2022-09-26 19:28:21
 * @Description: 
 */
import axios from "axios"

// 修改本账户信息
const edit = (data) => axios.put('/admins/account', data)

// 删除管理员
const remove = (id, params) => axios.delete(`/admins/${id}`, { params })

// 更新管理员个人资料
const update = (data) => axios.put('/admins/', data)

// 管理员注册
const register = (data) => axios.post('/admins/register', data)

// 管理员登录
const login = (data) => axios.post('/admins/login', data)

// 获取管理员个人资料
const info = (params) => axios.get('/admins', { params })

// 获取管理员列表
const getList = (params) => axios.get('/admins/list', { params })

export default {
    edit,
    remove,
    update,
    register,
    login,
    info,
    getList
}